package com.tzkyzj.tiremanager.dto;

public class TirePositionInfo {
    private String positionKey; // 如 "1轴左外"
    private int axleNumber;
    private String tirePosition;
    private int x;
    private int y;
    private boolean hasTire;
    private TireInfo tireInfo;
    // 添加轮胎ID字段
    private Long tireId;
    // 无参构造函数
    public TirePositionInfo() {
    }

    // 不含tireInfo的构造函数
    public TirePositionInfo(String positionKey, int axleNumber, String tirePosition, int x, int y, boolean hasTire, Long tireId) {
        this.positionKey = positionKey;
        this.axleNumber = axleNumber;
        this.tirePosition = tirePosition;
        this.x = x;
        this.y = y;
        this.hasTire = hasTire;
        this.tireId = tireId;
    }

    // 全参构造函数
    public TirePositionInfo(String positionKey, int axleNumber, String tirePosition, int x, int y, boolean hasTire, TireInfo tireInfo, Long tireId) {
        this.positionKey = positionKey;
        this.axleNumber = axleNumber;
        this.tirePosition = tirePosition;
        this.x = x;
        this.y = y;
        this.hasTire = hasTire;
        this.tireInfo = tireInfo;
        this.tireId = tireId;
    }

    // Getter 和 Setter 方法
    // 添加ID的Getter和Setter
    public Long getTireId() {
        return tireId;
    }

    public void setTireId(Long tireId) {
        this.tireId = tireId;
    }
    public String getPositionKey() {
        return positionKey;
    }

    public void setPositionKey(String positionKey) {
        this.positionKey = positionKey;
    }

    public int getAxleNumber() {
        return axleNumber;
    }

    public void setAxleNumber(int axleNumber) {
        this.axleNumber = axleNumber;
    }

    public String getTirePosition() {
        return tirePosition;
    }

    public void setTirePosition(String tirePosition) {
        this.tirePosition = tirePosition;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public boolean isHasTire() {
        return hasTire;
    }

    public void setHasTire(boolean hasTire) {
        this.hasTire = hasTire;
    }

    public TireInfo getTireInfo() {
        return tireInfo;
    }

    public void setTireInfo(TireInfo tireInfo) {
        this.tireInfo = tireInfo;
    }

    // toString 方法
    @Override
    public String toString() {
        return "TirePositionInfo{" +
                "positionKey='" + positionKey + '\'' +
                ", axleNumber=" + axleNumber +
                ", tirePosition='" + tirePosition + '\'' +
                ", x=" + x +
                ", y=" + y +
                ", hasTire=" + hasTire +
                ", tireInfo=" + tireInfo +
                ", tireId=" + tireId +
                '}';
    }
}
